package org.example.route.controller.AdminController;


import io.swagger.v3.oas.annotations.tags.Tag;
import org.example.route.model.dto.StatisticIncomeDTO;
import org.example.route.model.pojo.Order;
import org.example.route.model.pojo.Result;
import org.example.route.model.vo.OrderShowVO;
import org.example.route.model.vo.OrderStatisticVO;
import org.example.route.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/admin/statistic")
@Tag(name = "统计管理")
public class StatisticController {

    @Autowired
    private OrderService orderService;

    //统计某一日，月，季度，年，的总收入
    @PostMapping("/totalIncome")
    public Result<OrderStatisticVO> totalIncome(@RequestBody StatisticIncomeDTO statisticIncomeDTO){
             return Result.success(orderService.totalIncome(statisticIncomeDTO));
    }


    //统计订票的初始站点数量并排序
//    @PostMapping("/getStartStation")
//    public Result<>


    //统计订票的到达站点数量并排序

    //统计列车的数量

    //统计路线的数量等




}
